package com.example.zhongcao.mapper;
import com.example.zhongcao.entity.User;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {

    @Insert("insert into user(appid,appsecret,openid) values(#{appid},#{appsecret},#{openid})")
    void insertUser(User user);

    @Select("select * from user where appid=#{appid}")
    User selectByAppid(String appid);

    @Select("select * from user where openid=#{openid}")
    User selectByOpenid(String openid);
}
